package com.example.interfaces.dto;

import java.time.LocalDateTime;
import com.example.infrastructure.excel.ExcelExportable;
import com.example.infrastructure.excel.ExcelImportable;
import cn.idev.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import jakarta.validation.constraints.*;

/**
 * 预约记录表 DTO
 *
 * @author wangal
 * @since 2025-07-25
 */
@Data
@Schema(name = "AppointmentsDTO", description = "预约记录表DTO")
public class AppointmentsDTO implements ExcelExportable, ExcelImportable {

    @Schema(description = "预约单号")
    @ExcelProperty("预约单号")
    @NotBlank(message = "预约单号不能为空")
    private String appointmentNo;
    
    @Schema(description = "用户ID")
    @ExcelProperty("用户ID")
    @NotNull(message = "用户ID不能为空")
    private Long userId;
    
    @Schema(description = "医生ID")
    @ExcelProperty("医生ID")
    @NotNull(message = "医生ID不能为空")
    private Long doctorId;
    
    @Schema(description = "排班ID")
    @ExcelProperty("排班ID")
    @NotNull(message = "排班ID不能为空")
    private Long scheduleId;
    
    @Schema(description = "预约时间")
    @ExcelProperty("预约时间")
    private LocalDateTime appointmentTime;
    
    @Schema(description = "就诊人姓名")
    @ExcelProperty("就诊人姓名")
    @NotBlank(message = "就诊人姓名不能为空")
    private String patientName;
    
    @Schema(description = "就诊人电话")
    @ExcelProperty("就诊人电话")
    @NotBlank(message = "就诊人电话不能为空")
    private String patientPhone;
    
    @Schema(description = "就诊人身份证")
    @ExcelProperty("就诊人身份证")
    @NotBlank(message = "就诊人身份证不能为空")
    private String patientIdCard;
    
    @Schema(description = "症状描述")
    @ExcelProperty("症状描述")
    @NotBlank(message = "症状描述不能为空")
    private String symptoms;
    
    @Schema(description = "状态：0待就诊，1已完成，2已取消，3已过期")
    @ExcelProperty("状态：0待就诊，1已完成，2已取消，3已过期")
    private Byte status;
    
    @Schema(description = "取消原因")
    @ExcelProperty("取消原因")
    @NotBlank(message = "取消原因不能为空")
    private String cancelReason;
    
    @Schema(description = "租户编号")
    @ExcelProperty("租户编号")
    @NotNull(message = "租户编号不能为空")
    private Long tenantId;
    
}
